import { MergeConfigItem } from '@/components/FormPro/props';
import { getEditOrDetailConfig } from '@/components/FormPro/util';
import Upload from '@/components/Upload/index.vue';

export const getFormFileds = () => {
  const formBaseList: MergeConfigItem[] = [
    {
      label: '姓名',
      filed: 'realName',
      props: {
        component: {
          placeholder: '请输入 姓名',
        },
        formItem: {
          rules: [
            { required: true, trigger: 'change', message: '请输入 姓名' },
          ],
        },
      },
      component: 'a-input',
    },

    {
      label: '邮箱',
      filed: 'email',
      props: {
        component: {
          placeholder: '请输入 邮箱',
        },
        formItem: {
          rules: [
            { required: true, trigger: 'change', message: '请输入 邮箱' },
          ],
        },
      },
      component: 'a-input',
    },
  ];

  return getEditOrDetailConfig(formBaseList, 'edit');
};
